home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Hyper / Hy-Hyperi / HyperBBS 2.0.cpt / HyperBBS 2.0 / Chat / card_5678.txt < prev    next >
Text File  |  1992-07-14  |  2KB  |  75 lines

  1. -- card: 5678 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 2624
  5. -- name: Chat
  6. ----- HyperTalk script -----
  7. on openCard
  8.   global keybuff
  9.   global foundSoFar
  10.   put empty into foundSoFar
  11.   configureSPort lineFeedOn,echoOn
  12.   put "Type shift-6 (^) to exit chat..." into it
  13.   put it & return & return into cd field "Chat"
  14.   sendString return & return & return & it & return & return
  15.   play "chat"
  16.   put empty into keybuff
  17. end openCard
  18.  
  19. on idle
  20.   global foundSoFar
  21.   get recvUpTo(return,10,foundSoFar)
  22.   -- get recvChars(charsAvailable())
  23.   if it is not empty then put it after cd fld "Chat"
  24.   if it contains "^" then exitChat
  25.   else if it contains "NO CARR" then
  26.     put "Connection broken!"
  27.     exitChat
  28.   end if
  29. end idle
  30.  
  31. on keydown whichkey
  32.   global keybuff
  33.   get whichkey
  34.   if it is numToChar(8) then
  35.     put empty into last char of keybuff
  36.   else if it is "^" then exitChat
  37.   else
  38.     put it after keybuff
  39.     if it is  then beep 1
  40.     else
  41.       if (charToNum(it) < 65) or (charToNum(it) > 122) then
  42.         put keybuff after cd field "Chat"
  43.         sendString keybuff
  44.         put empty into keybuff
  45.       end if
  46.     end if
  47.   end if
  48. end keydown
  49.  
  50. on exitChat
  51.   beep 1
  52.   sendVanilla "Chat ending... "
  53.   pop card
  54. end exitChat
  55.  
  56.  
  57. -- part 1 (field)
  58. -- low flags: 04
  59. -- high flags: 0007
  60. -- rect: left=0 top=0 right=342 bottom=512
  61. -- title width / last selected line: 0
  62. -- icon id / first selected line: 0 / 0
  63. -- text alignment: 0
  64. -- font id: 203
  65. -- text size: 9
  66. -- style flags: 0
  67. -- line height: 12
  68. -- part name: Chat
  69.  
  70.  
  71. -- part contents for card part 1
  72. ----- text -----
  73. Type shift-6 (^) to exit chat...
  74.  
  75.